You can debug your script to investigate runtime errors and trace the execution flow. While debugging, data is displayed in the Tools panel.
▶
To enable debugging mode or disable it and return to normal mode, click Debug > Enable Breakpoints or Disable Breakpoints.
Note: Disabling breakpoints always resumes the script execution.
▶
While debugging, click Step Into and Step Over as appropriate. See the Exploring the Script Editor Interface section.
▶
To set breakpoints, double-click in the space to the far left of the line number. Breakpoints are disabled until you click EnableBreakpoints.
▶
Note these factors when debugging:
•
Breakpoints in coroutines are not supported.
•
If a breakpoint is set in a function that is a callback, the debugger may not stop at the breakpoint.
•
The debugger may not stop at functions such as on.save, on.restore, and on.destroy.
On the toolbar, Step Into and Step Over are enabled when breakpoints are enabled.
▶
To suspend and resume the script execution, click Suspend Script and Resume Script. When the script resumes, it runs until the next breakpoint is encountered or to the end of the script. A script can be suspended in normal mode or debugging mode.